﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GetPrime
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int n = int.Parse(s),m;
            m = n;
            for(int i = 2; i <= m; i ++)
            {
                if(n%i == 0)
                {
                    Console.WriteLine(i);
                    while(n % i == 0)
                    {
                        n /= i;
                    }
                }
            }
            Console.ReadLine();
        }
    }
}
